<template>
  <div class="hd">
    <a-row :gutter="24">
      <a-col :xl="8">
        <div class="hd_left">
          <div class="hour">{{ hourTime }}</div>
          <div class="year">{{ yearTime }}</div>
        </div></a-col
      >
      <a-col :xl="8"> <div class="center">云车间看板</div></a-col>
      <a-col :xl="8">
        <div class="hd_right">
          <div class="signOut">
            退出大屏
          </div>
        </div></a-col
      >
    </a-row>
  </div>
</template>

<script>
import moment from "moment";
export default {
  name: "index",
  data() {
    return {
      yearTime: moment().format("YYYY-MM-DD"),
      hourTime: moment().format("HH:mm:ss"),
    };
  },
  created() {
    this.currentTime();
  },
  methods: {
    getTime() {
      this.yearTime = moment().format("YYYY-MM-DD");
      this.hourTime = moment().format("HH:mm:ss");
    },
    currentTime() {
      setInterval(this.getTime, 1000);
    },
  },
};
</script>

<style lang="less">
@import "./style.less";
</style>
